GDK W32: Only use owner windows for popups
authorРуслан Ижбулатов <lrn1986@gmail.com>
Tue, 28 May 2019 16:39:58 +0000 (16:39 +0000)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 28 May 2019 20:25:17 +0000 (20:25 +0000)
commitb12d521bceb943dfeb601203727111a0d688de8c
tree42969085a54f6032efbb4679cff84556fd0469f5
parent493b30c2a83c95cac1669d842132b53f0b1b543e
GDK W32: Only use owner windows for popups

GTK4 doesn't have WS_CHILD windows anymore, so hWndParent argument
to CreateWindowEx() is always interpreted as the owner window,
not the parent window.

A window with an owner:
* is above the owner in Z-order
* is destroyed when the owner is destroyed
* is hidden when the owner is minimized
This is enforced by the OS.

GTK can only allow this for popup windows.

Desktop window must never[0] be an owner.

[0]: https://devblogs.microsoft.com/oldnewthing/20040224-00/?p=40493
gdk/win32/gdksurface-win32.c